#include "widget.h"
#include "ui_widget.h"

Widget::Widget(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::Widget)
{
    ui->setupUi(this);
    connect(this,&Widget::mysignal,this,&Widget::myhandler);
}

Widget::~Widget()
{
    delete ui;

}

void Widget::myhandler(){
    this->setWindowTitle("new title!");
}
void Widget::on_pushButton_clicked()
{
    emit mysignal();
}
